package com.syg.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import static org.springframework.web.bind.annotation.RequestMethod.GET;

/**
 * @author oe_shenyiguang
 */
@Component
@RequestMapping("/config")
public class NacosConfig {

    @Value(value = "${useLocalCache}")
    private String useLocalCache;

    @RequestMapping(value = "/get", method = GET)
    @ResponseBody
    public void get() {
        System.out.println(useLocalCache);
    }

    public String getUseLocalCache() {
        return useLocalCache;
    }

    public void setUseLocalCache(String useLocalCache) {
        this.useLocalCache = useLocalCache;
    }
}
